#include<iostream>
using namespace std;
long long f[36];
int main(){
    int m,num=1;
    f[0]=1;
    f[1]=1;
    for (int i = 2; i < 36; i++)
    {
        for(int j=0;j<36;j++){
            f[i]=f[i]+f[j]*f[i-j-1];//卡特兰数
        }
    }
    while (cin>>m&&m!=-1)
    {
        cout<<num<<" "<<m<<" "<<2*f[m]<<endl;
        num++;
    }
    
}
